home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / program / swagg_m.zip / HARDWARE.SWG / 0014_Which BIOS.pas < prev    next >
Pascal/Delphi Source File  |  1993-11-02  |  963b  |  40 lines

  1. {
  2. KAI ROHRBACHER
  3.  
  4. > What bios are you using?
  5. It's  an AMI-BIOS, dated 03-06-1992; but I ran the same code on an old
  6. Tandon-AT (with BIOS from 1987) w/o problems, too!
  7.  
  8. > Do you have any other timing code?
  9. Not  at  hand;  one  could reProgram the trigger rate of timer 0 to be
  10. faster  than  1/18.2  sec,  but in my experience, this results in even
  11. more incompatibilities when interfacing the Unit to others.
  12. }
  13.  
  14. Function BIOScompatible : Boolean;
  15. Var
  16.   Flag : Byte;
  17.   p    : Pointer;
  18. begin
  19.   Flag := 0;
  20.   p    := @Flag;
  21.   if AT then
  22.   Asm
  23.     STI
  24.     xor CX, CX
  25.     MOV DX, 1
  26.     LES BX, p
  27.     MOV AX, 8300h  {trigger 1 microsecond}
  28.     INT 15h
  29.    @L11:
  30.   end;
  31.   Delay(1); {wait 1 ms:}
  32.   BIOScompatible := Flag = $80; {has flag been set?}
  33. end;
  34.  
  35. {
  36.   ...results  in  False  For you, I can't do much! However, I'll add the
  37.   above  routine to disable the timing mechanism in that Case to prevent
  38.   the endless loop, at least.
  39. }
  40.